﻿<!DOCTYPE html>
<html>
<head>
    <script src="/js/header.js"></script>
    <script src="/lib/date/wdatepicker.js"></script>
</head>
<body>
    <div class="data-wrap case" id="container">
        <div class="data-tool clearfix">
            <div class="pull-right">
                <form class="form-inline" id="formSearch">

                    <div class="input-group">
                        <label class="input-group-addon m5_l">IP：</label>
                        <input class="form-control" name="ip" type="text" />
                    </div>

                    <div class="input-group">
                        <label class="input-group-addon m5_l">创建人名称：</label>
                        <input class="form-control" name="CreateName" type="text" />
                    </div>

                    <div class="input-group">
                        <label class="m20_l">创建时间：</label>
                        <input id="d421" class="Wdate m5_l" name="createDate" type="text" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" />
                        --
                        <input id="d422" class="Wdate m5_l" name="endcreateDate" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'d421\')}'})" />
                    </div>

                    <!--<div class="input-group">
                        <label class="m20_l">日志类型：</label>
                        <select class="m15_l" name="logType">
                            <option value="">请选择</option>
                        </select>
                    </div>-->
                    <button type="button" class="btn btn-primary m100_l" id="btnSearch">搜索</button>
                </form>
            </div>
        </div>
        <div class="paging">
        </div>

    </div>
    <script type="text/x-dot-template" id="templatePager">
        <div class="data-head">
            <table class="table">
                <thead>
                    <tr>
                        <th>IP</th>
                        <th>日志类型</th>
                        <th>创建人名称</th>
                        <th>创建时间</th>
                        <th>备注</th>
                        <th>公司名称</th>
                        <th>回调地址</th>
                        <th width="200">操作</th>
                    </tr>
                </thead>
            </table>
        </div>

        <div class="data-body data-scroll">
            <div class="data-div-view">
                <table class="table table-hover">
                    <tbody>
                        {{~it.tData :item:index}}
                        <tr>
                            <td>{{= item.ip }}</td>
                            <td>{{= item.logType }}</td>
                            <td>{{= item.createName }}</td>
                            <td>{{= FlashPay.Util.FormatDate(item.createDate) }}</td>
                            <td>{{= FlashPay.Util.GetShortStr(item.logRemark)}}</td>
                            <td>{{= item.companyName }}</td>
                            <td>{{= item.requestUrl }}</td>
                            <td width="200">
                                <a class="btn btn-danger m5_l"
                                   data-confirm='"{{= item.logId }}" <br>确定要<span class="red">删除</span>该条记录吗？'
                                   data-href="/LogRecord/Delete?Id={{= item.logId}}">
                                    <span class="glyphicon glyphicon-trash"></span> 刪除
                                </a>
                            </td>
                        </tr>
                        {{~}}
                    </tbody>
                </table>
            </div>
        </div>
        <!-- 必要的分页参数设置 -->
        <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
    </script>
    <script type="text/javascript">
        $(function () {
            doSearch();
            //搜索
            $("#btnSearch").click(function () {
                doSearch();
            });
            $("body").keydown(function (event) {
                if (event.keyCode == "13") {
                    doSearch();
                }
            });
        });
        function doSearch() {
            FlashPay.UI.Pager(".paging", { templateId: "templatePager", ajax: { url: '/LogRecord/Get', Method: 'Post' } });
        }
        function Tip_success(word) {
            FlashPay.UI.Tip_success(word);
        }
    </script>
</body>
</html>